<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib  prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="redis" uri="http://www.shopjsp.com/redisTag/functions" %>
<c:set var="basePath" value="${redis:getSysConfig('base_path_back')}"/>
<c:set var="srcPath" value="${redis:getSysConfig('sysFileVisitRoot_back')}"/>
<c:set var="uploadPath" value="${redis:getSysConfig('uploadFileVisitRoot')}"/>
<script type="text/javascript">
    /**
     * 查看分类详情
     */
    function detailInfo(id){
        $.ajax({
            type: "POST",
            dataType: "JSON",
            url: "${basePath}/back/cmsArticle/getCmsArticle.sjson",
            data: {articleId:id},
            success: function(result){
                var data = JSON.parse(result.data);
                /**重置详情页中所有html展示信息**/
                resetDetailTable("detailTable");
                /**设置展示信息**/
                var potoUploadRoot = "${uploadPath}";
                /**图片**/
                $("#d_photo").html("<img id='uploadImg_detail_"+id+"' class='uploadImg' onMouseOver='showDetailBigImage("+id+",3,3,0)'  onMouseOut='showDetailRebackImage("+id+",1,1)' src='${uploadPath}/"+data.imgUrl+"' onerror='this.src=\"${srcPath}/common/images/mrbj.png\"' width='50px' height='50px' />");
                /**标题**/
                $("#d_title").html(data.title);
                /**编码**/
                $("#d_articleCode").html(data.articleCode);
                /**摘要**/
                $("#d_brief").html(data.brief);
                /**seoTitle**/
                $("#d_seoTitle").html(data.seoTitle);
                /**seo关键词**/
                $("#d_keywords").html(data.keywords);
                /**新闻内容**/
                $("#d_content").html(data.content);
                /**排序**/
                $("#d_sortCode").html(data.sortCode);
                /**发布人**/
                $("#d_publishUser").html(data.publishUser);
                /**修改人**/
                $("#d_modifyUser").html(data.modifyUser);
                /**创建时间**/
                if(data.createTime!=""&&data.createTime!=undefined){
                    $("#d_createTime").html(new Date(data.createTime).Format("yyyy-MM-dd hh:mm:ss"));
                }
                /**修改时间**/
                if(data.updateTime!=""&&data.updateTime!=undefined){
                    $("#d_updateTime").html(new Date(data.updateTime).Format("yyyy-MM-dd hh:mm:ss"));
                }
    			/**是否显示**/
                if(data.isShow=="0"){
                    $("#d_isShow").html("<font class='color_002'>未显示</font> ");
                }
                if(data.isShow=="1"){
                    $("#d_isShow").html("<font class='color_001'>已显示</font>");
                }

            }
        });
    }

</script>

<!--详情模态框（Modal） -->
<div class="modal fade" id="detailModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" >
	<div class="modal-dialog" style="width:70%">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
				<h5 class="modal-title" id="myModalLabel">新闻详情</h5>
			</div>
			<div class="modal-body">
				<table id="detailTable" align="center" class="addOrEditTable table table-bordered" style="width:100%;">
					<tr>
						<td class="toright_td" width="150px">图片预览:</td>
						<td  class="toleft_td" colspan="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span id="d_photo" ></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">新闻标题:</td><td  class="toleft_td" colspan="3">&nbsp;&nbsp;<span id="d_title"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">新闻编码:</td><td  class="toleft_td" colspan="3">&nbsp;&nbsp;<span id="d_articleCode"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">摘要:</td><td  class="toleft_td" colspan="3">&nbsp;&nbsp;<span id="d_brief"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">排序:</td><td  class="toleft_td">&nbsp;&nbsp;<span id="d_sortCode"></span></td>
						<td class="toright_td" width="150px">是否显示:</td><td  class="toleft_td">&nbsp;&nbsp;<span id="d_isShow"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">发布人:</td><td  class="toleft_td">&nbsp;&nbsp;<span id="d_publishUser"></span></td>
						<td class="toright_td" width="150px">修改人:</td><td  class="toleft_td"  colspan="3">&nbsp;&nbsp;<span id="d_modifyUser"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">创建时间:</td><td  class="toleft_td">&nbsp;&nbsp;<span id="d_createTime"></span></td>
						<td class="toright_td" width="150px">修改时间:</td><td  class="toleft_td"  colspan="3">&nbsp;&nbsp;<span id="d_updateTime"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">seo标题:</td><td  class="toleft_td">&nbsp;&nbsp;<span id="d_seoTitle"></span></td>
						<td class="toright_td" width="150px">seo关键词:</td><td  class="toleft_td"  colspan="3">&nbsp;&nbsp;<span id="d_keywords"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">内容:&nbsp;&nbsp;</td>
						<td  class="toleft_td"  colspan="3">&nbsp;&nbsp;<div id="d_content"></div></td>
					</tr>

				</table>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
			</div>
		</div><!-- /.modal-content -->
	</div><!-- /.modal -->
</div>